﻿using Volo.Abp.Auditing;
using Volo.Abp.Modularity;

namespace Framework.AuditLogging
{
	[DependsOn(
		typeof(AbpAuditingModule)   // 集成 审计和审计日志记录功能 模块
	)]
	public class FrameworkAuditLoggingModule : AbpModule
	{
		public override void ConfigureServices(ServiceConfigurationContext context)
		{
			// 审计日志
			Configure<AbpAuditingOptions>(optios =>
			{
				//默认关闭，开启会有大量的审计日志
				optios.IsEnabled = true;
				//审计日志过滤器
				optios.AlwaysLogSelectors.Add(x => Task.FromResult(true));
			});
		}
	}
}
